package com.medical.admin.sys.controller;

import com.medical.admin.sys.common.dto.PermissionDto;
import com.medical.admin.sys.entity.Permission;
import com.medical.admin.sys.service.PermissionService;
import com.qf.medical.response.ResponseEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/*
 * @Date : 2024/4/26 19:02
 * @Created by Lang
 * @ProjectName : medical-appointment-registration
 */
@Api(tags = "权限管理文档")
@RestController
@RequestMapping("/permission")
public class PermissionController {
    @Resource
    private PermissionService permissionService;

    @ApiOperation("权限列表")
    @GetMapping("/list")
    public ResponseEntity<List<PermissionDto>> list(){
        List<PermissionDto> permissionList = permissionService.list();
        return ResponseEntity.success(permissionList);
    }
}
